package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.StartGroupActivity;
import com.wwtech.epp.ui.activity.friend.contract.StartGroupContract;
import com.wwtech.epp.ui.activity.friend.presenter.StartGroupPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of StartGroupActivity, provide field for StartGroupActivity
 * @date 2017/09/06 23:23:03
 */
@Module
public class StartGroupModule {
    private final StartGroupContract.View mView;


    public StartGroupModule(StartGroupContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public StartGroupPresenter provideStartGroupPresenter(HttpAPIWrapper httpAPIWrapper, StartGroupActivity mActivity) {
        return new StartGroupPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public StartGroupActivity provideStartGroupActivity() {
        return (StartGroupActivity) mView;
    }
}